package com.yxym.homework04;

public class Scientist extends Employee{
    private double annualBonus;

    public Scientist(String name, double basicSalary, double grade) {
        super(name, basicSalary, grade);
    }

    public double annualBonus() {
        return annualBonus = 52000.0;
    }

    public void setAnnualBonus(double annualBonus) {
        this.annualBonus = annualBonus;
    }

    @Override
    public void printSalary() {
        System.out.println("科学家" + getName() + "\t" +
                "基本工资:" + getBasicSalary()
                + "\t" + "年终奖：" + annualBonus() + "\t" +
                ("年工资为：" + ((getBasicSalary())
                + annualBonus())));

    }

}
